package lbj.cyw.dp;
/*
* 青蛙跳台阶
* */
public class Offer10numWays {
    public int numWays(int n) {
        if(n==0 || n==1){
            return 1;
        }
        int a=1;
        int b=1;
        int c=0;
        for(int i=2;i<=n;i++){
            c=a+b;
            a=b;
            c%=1000000007;
            b=c;

        }
        return c;
    }
}
